import request from '@utils/request'

// 列表查询
export function getList (data) {
  return request({
    url: '/gradeInformation/getPageList',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json',
      'Authorization': window.localStorage.getItem('token'),
    }
  })
}

// 新增
export function addClass (data) {
  return request({
    url: '/gradeInformation/save',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json',
      'Authorization': window.localStorage.getItem('token'),
    }
  })
}

// 修改
export function changeClass (data) {
  return request({
    url: '/gradeInformation/updateInformation',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/json',
      'Authorization': window.localStorage.getItem('token'),
    }
  })
}

// 删除
export function removeClass (data) {
  return request({
    url: '/gradeInformation/delInformation',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
      'Authorization': window.localStorage.getItem('token'),
    }
  })
}

// 导入
export function uploadClass (data) {
  return request({
    url: '/gradeInformation/uploadIn',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'multipart/form-data',
      'Authorization': window.localStorage.getItem('token'),
    }
  })
}

// 导出模板
export function exportClass (data) {
  return request({
    url: '/gradeInformation/downLoadExcel',
    method: 'post',
    data: data,
    responseType: 'blob',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': window.localStorage.getItem('token'),
    }
  })
}